{extend name="public/world"}
{block name="title"}修改商品{/block}
{block name="style"}
<style type="text/css">

</style>
{/block}
{block name="container"}
<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
    <div class="layui-card" style="padding:20px 0 0 0;height:425px;">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">商品名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" value="{$good.name}" lay-verify="required" placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">规格说明</label>
                <div class="layui-input-inline">
                    <input type="text" name="norm" value="{$good.norm}" placeholder="请输入规格说明" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">物料组</label>
                <div class="layui-input-inline">
                    <select name="tid" lay-verify="required" lay-search>
                        {volist name="treeData" id="tree"}
                        <option value="{$key}">{$tree}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label label-required">销售单位</label>
                <div class="layui-input-inline">
                    <select name="unit" lay-verify="required" lay-search>
                        <option value="">请选择</option>
                        {volist name="units" id="unit"}
                        <option value="{$key}"{if $good.unit==$key} selected{/if}>{$unit}</option>
                        {/volist}
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">默认供应商</label>
                <div class="layui-input-inline">
                    <select name="vid" lay-search>
                        <option value="">请选择</option>
                        {volist name="users" id="user"}
                        <option value="{$user.id}"{if $good.vid==$user.id} selected{/if}>{$user.name}-{$user.phone}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">制造厂商</label>
                <div class="layui-input-inline">
                    <input type="text" name="factory" value="{$good.factory}" placeholder="请输入制造厂商" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">序列号</label>
                <div class="layui-input-inline">
                    <input type="radio" name="check_out" value="0" title="不强制"{if $good.check_out==0} checked{/if}>
                    <input type="radio" name="check_out" value="1" title="强制"{if $good.check_out==1} checked{/if}>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">条形码</label>
                <div class="layui-input-inline">
                    <input type="text" name="bar_code" value="{$good.bar_code}" placeholder="请输入制造厂商" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">实际成本</label>
                <div class="layui-input-inline">
                    <input type="text" name="price" value="{$good.price}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">零售报价</label>
                <div class="layui-input-inline">
                    <input type="text" name="retail_price" value="{$good.retail_price}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label label-required">零售限价</label>
                <div class="layui-input-inline">
                    <input type="text" name="retail_price_limit" value="{$good.retail_price_limit}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">分销报价</label>
                <div class="layui-input-inline">
                    <input type="text" name="agent_price" value="{$good.agent_price}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label label-required">分销限价</label>
                <div class="layui-input-inline">
                    <input type="text" name="agent_price_limit" value="{$good.agent_price_limit}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">最大库存量</label>
                <div class="layui-input-inline">
                    <input type="text" name="max_stock" value="{$good.max_stock}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label label-required">最小库存量</label>
                <div class="layui-input-inline">
                    <input type="text" name="min_stock" value="{$good.min_stock}" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label label-required">状态</label>
                <div class="layui-input-inline">
                    <input type="radio" name="status" value="1" title="正常"{if $good.status==1} checked{/if}>
                    <input type="radio" name="status" value="0" title="停用"{if $good.status==0} checked{/if}>
                </div>
            </div>、
        </div>
        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="LAY-front-submit" id="LAY-front-submit" value="确认">
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script>
    //JavaScript代码区域
    layui.use(['form'], function() {
        var $ = layui.$
            , form = layui.form;
    });
</script>
{/block}